function addBlocks (Blockly) {
    const color = '#FF5511'; // 255,171,25

    Blockly.Blocks.singleLED_setLEDState = {// loonson no pro
        init: function () {
            this.jsonInit({
                message0: Blockly.Msg.SINGLELED_SET_LED_STATE,//Blockly.Msg.SINGLELED_SET_LED_STATE
                args0: [
                    {
                        type: 'field_dropdown',// input gpoio
                        name: 'pin',
                        options: [
                            ['GPIO1','GPIO1'],
                            ['GPIO2','GPIO2'],
                            ['GPIO3','GPIO3'],
                            ['GPIO4','GPIO4'],
                            ['GPIO5','GPIO5'],
                            ['GPIO6','GPIO6'],
                            ['GPIO7','GPIO7']
                        ]
                    },
                    {
                        type: 'field_dropdown', // xia la  menu
                        name: 'state',
                        options: [
                            [Blockly.Msg.SINGLELED_ON, '1'],
                            [Blockly.Msg.SINGLELED_OFF, '0']]
                    }
                ],
                colour: color,
                extensions: ['shape_statement'] // have diff output_number
                // block type
            });
        }
    };

    return Blockly;
}

exports = addBlocks;
